"""
# Definition for a Node.
"""
class Node(object):
    def __init__(self, val, children):
        self.val = val
        self.children = children



class Solution(object):
    def maxDepth(self, root):
        """
        :type root: Node
        :rtype: int
        """
        if not root:
            return 0
        res = 1
        for child in root.children:
            res = max(res,self.maxDepth(child) + 1)
        return res



m1 = Node(5,None)
m2= Node(2,m1)
m3 =Node(13,[m2])
# m1.right.left = TreeNode(2)
# m1.right.right = TreeNode(3)
# m1.right.right.left = TreeNode(3)
s = Solution()

t = s.maxDepth(m3)
print(t)